import * as types from './mutations_types'
let store = {get(){}};
export default {
  [types.SET_CUR_ROUTE](state, paths) {
    // console.log(paths);
    state.headerCurRouter = paths.rootPath;
    state.leftCurRouter = paths.fullPath;
  },
  [types.SAVE_ROUTE](state, paths) {
    store.set('path', paths);
    store.set('is_save_router', true);
    state.router = paths;
    state.is_save_router = true;
  },
  [types.REMOVE_ROUTER](state) {
    store.set('path', null);
    store.set('is_save_router', false);
    state.router = null;
    state.is_save_router = false;
  },
  [types.SAVE_CURRENT_ROUTER](state, paths) {
    store.set('current_path', paths);
    state.current_path = paths;
  },
  [types.REMOVE_CURRENT_ROUTER](state){
    store.set('current_path', null);
    state.current_path = null;
  }
};
